//
//  BYJSearchCollectionViewCell.m
//  BLDMusics
//
//  Created by 白云杰 on 16/3/24.
//  Copyright © 2016年 李晓丹. All rights reserved.
//

#import "BYJSearchCollectionViewCell.h"

@interface BYJSearchCollectionViewCell ()

@property (nonatomic, retain) UILabel *singName;

@end

@implementation BYJSearchCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)setModel:(BYJSearchModel *)model {
    _model = model;
    [self assignment];
}


- (void)createCell {
    
    self.singName = [[UILabel alloc] init];
    [self.contentView addSubview:_singName];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    _singName.frame = self.contentView.bounds;
    _singName.textAlignment = NSTextAlignmentCenter;
    _singName.font = [UIFont systemFontOfSize:15];
    _singName.layer.cornerRadius = 15;
    _singName.layer.masksToBounds = YES;
    _singName.backgroundColor = [UIColor lightGrayColor];
}

- (void)assignment {
    _singName.text = _model.val;
}













@end
